<!DOCTYPE html>
<html lang="en" xmlns:th="https://www.thymeleaf.org/">
<head>
    <meta charset="UTF-8">
    <title>归档</title>
    <link rel="stylesheet" th:href="@{/layui/css/layui.css}">
</head>
<body>
<div class="layui-container">
    <table class="layui-table">
        <thead>
        <tr>
            <th width="80%">描述</th>
            <th>操作时间</th>
        </tr>
        </thead>

        <tbody>
        <tr>
            <td>- 校验接口信息：</td><td>2024-06-20 14:13:36</td>
        </tr>
        <tr>
            <td>- 应用系统ID: 5f1fa92f469a9e372aa5b5ab28facb378cecf4962ef7a378240618941690595e</td><td>2024-06-20 14:13:36</td>
        </tr>
        <tr>
            <td>- 业务系统的签名信息: 78409a87799ca4885db913203732499c8d9162d715980ebefaf6fc690b9a31d6</td><td>2024-06-20 14:13:36</td>
        </tr>
        <tr>
            <td>- 档案系统计算的签名信息: 78409a87799ca4885db913203732499c8d9162d715980ebefaf6fc690b9a31d6</td><td>2024-06-20 14:13:37</td>
        </tr>
        <tr>
            <td>- 接口信息校验完成(调用者 数字发改综合服务平台)</td><td>2024-06-20 14:13:37</td>
        </tr>
        <tr>
            <td>- 接口参数：{"id":17,"packagePath":"https://172.26.120.99:9000/archive/17_20240620.zip","packageSize":"199022322",
                "packageName":"17_20240620.zip","packageSm3":"0A2DE7DC3CDDAC1ADAD62D4907BC2DCFEA737C51885A8D9664AEAAEFDC35FBD5","type":"1"}</td><td>2024-06-20 14:13:37</td>
        </tr>
        <tr>
            <td>下载归档信息</td><td>2024-06-20 14:13:37</td>
        </tr>
        <tr>
            <td>- 下载归档信息包 成功</td><td>2024-06-20 14:13:41</td>
        </tr>
        <tr>
            <td>计算归档信息包SM3值: 0A2DE7DC3CDDAC1ADAD62D4907BC2DCFEA737C51885A8D9664AEAAEFDC35FBD5</td><td>2024-06-20 14:13:42</td>
        </tr>
        <tr>
            <td>- 比对接口的SM3值 一致</td><td>2024-06-20 14:13:42</td>
        </tr>

        </tbody>
    </table>

    <div id="cryptDiv">
        <h1>saaaaas</h1>
    </div>
</div>

<script th:src="@{/layui/layui.js}"></script>
<script th:src="@{/crypto/crypto-js.js}"></script>
<script>
    function getCryptKey(key){
        key = key || "fgwservices0000000000000";
        while(key.length < 16) key = key + "0";
        return key.substr(0,16);
    }
    function Encrypt(word){
        var key = CryptoJS.enc.Utf8.parse(getCryptKey());
        var srcs = CryptoJS.enc.Utf8.parse(word);
        var encrypted = CryptoJS.AES.encrypt(srcs, key, {mode:CryptoJS.mode.ECB,padding: CryptoJS.pad.Pkcs7});
        return encrypted.toString();
    }
    function Decrypt(word){
        var key = CryptoJS.enc.Utf8.parse(getCryptKey());
        var decrypt = CryptoJS.AES.decrypt(word, key, {mode:CryptoJS.mode.ECB,padding: CryptoJS.pad.Pkcs7});
        return CryptoJS.enc.Utf8.stringify(decrypt).toString();
    }

    document.getElementById("cryptDiv").innerText = "aaaaa" + Encrypt("admin|1721980567941");
</script>
</body>
</html>